<div class="p15">
    {include file="common/breadcrumb" /}
    <div class="am-form am-form-horizontal">
        <form data-am-validator method="post" action="{:url('edit',['id'=>$data.id])}">
            <div class="am-form-group">
                <label class="am-para-label">上级：</label>
                <div class="am-para-input">
                    <select name="pid">
                        {$classifyStr}
                    </select>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-para-label">分类名称：</label>
                <div class="am-para-input">
                    <input type="text" required name="name" value="{$data.name}" />
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-para-label">描述：</label>
                <div class="am-para-input">
                    <textarea name="description">{$data.description}</textarea>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-para-label">封面图：</label>
                <div class="am-para-input">
                    <div class="coms-plupload-container "> 
                            <div class='coms-plupload-nofile  {if condition="$data.coverimg"}none{/if}'></div>
                            <ul class="coms-upload-list clearfix">
                                {if condition="$data.coverimg"}
                                <li data-url="{$data.coverimg}">
                                    <div class="img-wrap">
                                        <div class="preview-pic" style="display:block;"><img src="{$data.coverimg}" class="uploadimg" /></div></div>
                                        <input type="hidden"  name="coverimg" value="{$data.coverimg}">
                                </li>
                                {/if}
                            </ul>
                            <div class="coms-btn-choice  clearfix">
                                <a id="J_pickfiles1" class="btn-pickfiles" href="javascript:;">选择文件</a>
                                <a href="javascript:void(0);" class="btn-startload-file">上传文件</a>
                                <a href="javascript:void(0);" class="btn-stopload-file">暂停上传</a>
                            </div>

                        </div>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-para-label">排序：</label>
                <div class="am-para-input">
                    <input type="text" required name="sort_id" value="{$data.sort_id}" />
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-para-label">SEO标题：</label>
                <div class="am-para-input">
                    <input type="text" name="seotitle" value="{$data.seo_title}" />
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-para-label">SEO关键字：</label>
                <div class="am-para-input">
                    <input type="text" name="seokeyword" value="{$data.seo_keyword}" />
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-para-label">SEO描述：</label>
                <div class="am-para-input">
                    <textarea name="seodescription">{$data.seo_description}</textarea>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-para-label"></label>
                <div class="am-para-input">
                    <input type="submit" class="am-btn am-btn-primary">
                    <input type="reset" class="am-btn am-btn-default">
                </div>
            </div>
        </form>
    </div>
</div>
    <link rel="stylesheet" type="text/css" href="__STATIC__/admin/js/plugin/plupload/plupload.css" />
    <script type="text/javascript" src="__STATIC__/admin/js/plugin/ueditor1_4_3/ueditor.config.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/js/plugin/ueditor1_4_3/ueditor.all.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/js/plugin/plupload/plupload.full.min.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/js/plugin/plupload/uploadfile.js"></script>
<script type="text/javascript">
 (function($){
    $(function(){
          coverimgUploader=$("#J_pickfiles1").plupload({
                url: '__STATIC__/admin/js/plugin/plupload/php/upload.php',
                delServerBtn:false,
                inputHidden:{
                    name:"coverimg"
                },
                filters: {
                    max_file_count:1
                },
                multipart_params: {
                   
                },
                initLoad:function(up){

                },
                //每个文件上传成功调用函数
                fileUploaded:function(up,file,info){
                  
                },
                //plupload 执行全部的上传事件后触发该函数，只触发一次
                uploadComplete:function(up,files){

                }
            });  
    });
})(jQuery)
</script>
